using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;

public class TestOnDestroy : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        StartCoroutine(Test());
    }

    void OnDisable()
    {
        Debug.LogWarning("test warning");
    }

    IEnumerator Test()
    {
        yield return null;
        GameObject.Destroy(this.gameObject);
        Debug.LogWarning("test 1 " + this.enabled + " " + (this == null) + " " + (this.gameObject == null) + " " + (this.gameObject.IsDestroyed()) + " " + (this.IsDestroyed()));
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}
